<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class EntityRequest extends FormRequest
{

    public function authorize()
    {
        return [
            'father_name'=> 'required',
            'father_id_code'=>'required',
            'father_works'=>'required',
            'father_phone_number'=>'required',
            'mother_name'=>'required',
            'mother_id_code'=>'required',
            'mother_works'=>'required',
            'mother_phone_number'=>'required',
            'family_address'=>'required'
        ];
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'father_name.required'=>'父亲姓名必填',
            'father_id_code.required'=>'父亲身份证号码必填',
            'father_works.required'=>'父亲工作单位必填',
            'father_phone_number.required'=>'父亲手机号必填',
            'mother_name.required'=>'母亲姓名必填',
            'mother_id_code.required'=>'母亲身份证号码必填',
            'mother_works.required'=>'母亲工作单位必填',
            'mother_phone_number.required'=>'母亲手机号必填',
            'family_address.required'=>'家庭住址必填'
        ];
    }
}
